package com.xxq.semester.auth.feign;

import com.xxq.semester.common.entity.ResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 用户服务Feign客户端
 */
@FeignClient(name = "semester-user", path = "/api/users")
public interface UserFeignClient {
    
    @GetMapping("/{id}")
    ResponseEntity<Object> getUserById(@PathVariable("id") Integer id);
    
    @GetMapping("/email/{email}")
    ResponseEntity<Object> getUserByEmail(@PathVariable("email") String email);
}
